package com.example.ass7.task;

import com.example.ass7.animation.AnimationRunner;
import com.example.ass7.animation.KeyPressStoppableAnimation;

/**
 * @author Meirav Ben Izhak
 */
public class ShowHiScoresTask implements Task<Void> {

    private final AnimationRunner runner;
    private final KeyPressStoppableAnimation scores;

    /**
     * @param runner
     *            runner
     * @param scores
     *            scores
     */
    public ShowHiScoresTask(
        AnimationRunner runner, KeyPressStoppableAnimation scores) {
        this.runner = runner;
        this.scores = scores;
    }

    @Override
    public Void run() {
        this.runner.run(this.scores);
        return null;
    }
}